Skip to content

Conversation

@Ericson2314
Copy link
Member

Motivation

Fix #14532.

Context

As discussed on the call today:

  1. We'll stick with format = "base16" and hash = "<hash>", not do base16 = "<hash>", in order to be forward compatible with supporting more versioning formats.

    The motivation we discussed for someday possibly doing this is making it easier to write very slap-dash lang2nix tools that create (not consume) derivations with dynamic derivations.

  2. We will remove support for non-base16 (and make that the default, not base64) in Hash, so this is strictly forward contingency, not yet something we support. (And also not something we have concrete plans to start supporting.)


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@github-actions github-actions bot added documentation with-tests Issues related to testing. PRs with tests have some priority labels Nov 10, 2025
Fix #14532.

As discussed on the call today:

1. We'll stick with `format = "base16"` and `hash = "<hash>"`, not do
   `base16 = "<hash>"`, in order to be forward compatible with
   supporting more versioning formats.

   The motivation we discussed for someday *possibly* doing this is
   making it easier to write very slap-dash lang2nix tools that create
   (not consume) derivations with dynamic derivations.

2. We will remove support for non-base16 (and make that the default, not
   base64) in `Hash`, so this is strictly forward contingency, *not*
   yet something we support. (And also not something we have concrete
   plans to start supporting.)
@roberth
Copy link
Member

roberth commented Nov 11, 2025

Did we accidentally duplicate the derivation outputs fixed output output format earlier?

...
    "name": "bash-5.3.tar.gz",
    "outputs": {
      "out": {
        "hash": {
          // howdy
          "algorithm": "sha256",
          "format": "base64",
          "hash": "DVzYaWX4aaJs9k9Lcb57lvkKO6iz104n6OnZ1VUPMbo="
        },
        "method": "flat"
      }
    },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation with-tests Issues related to testing. PRs with tests have some priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tighten down Hash JSON format

3 participants